<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        /*
        1.search(value)
        返回搜索字符的下标 如不存在，返回-1
        2.match(value)
        将配置的内容，返回一个数组
        字符不存在，返回null
        3.replace()替换
        */
        
        var str="hello world";
        var b=str.search("h");
        var c=str.match("l");
        var d=str.replace(/l/g,"*");
        console.log(b);
        console.log(c);
        console.log(d);

    </script>
</body>
</html>